﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SourFruit.player;
using Microsoft.Xna.Framework.Graphics;

namespace SourFruit.level.obj
{
    /// <summary>
    /// Platforms are used to stop the player from falling down due to gravity.
    /// </summary>
    public class Platform : LevelObject
    {
        /// <summary>
        /// Determines if the player can stand on the platform.
        /// </summary>
        private Boolean canStandOn;

        /// <summary>
        /// Creates a single platform.
        /// </summary>
        public Platform(int _posX, int _posY, int _width, int _height, Texture2D _texture, Boolean _canStandOn)
            : base(_posX, _posY, _width, _height, _texture)
        {
            this.canStandOn = _canStandOn;
        }

        /// <summary>
        /// Creates a single platform.
        /// </summary>
        public Platform(int _posX, int _posY, int _width, int _height, Texture2D[] _texture, int _imageIntervalMs, Boolean _canStandOn)
            : base(_posX, _posY, _width, _height, _texture, _imageIntervalMs)
        {
            this.canStandOn = _canStandOn;
        }

        /// <summary>
        /// Creates a single platform.
        /// </summary>
        public Platform(int _posX, int _posY, int _width, int _height, Texture2D _texture, Boolean _canStandOn, MovingOptions _moves, float _speed)
            : base(_posX, _posY, _width, _height, _texture, _moves, _speed)
        {
            this.canStandOn = _canStandOn;
        }

        /// <summary>
        /// Creates a single platform.
        /// </summary>
        public Platform(int _posX, int _posY, int _width, int _height, Texture2D[] _texture, int _imageIntervalMs, Boolean _canStandOn, MovingOptions _moves, float _speed)
            : base(_posX, _posY, _width, _height, _texture, _imageIntervalMs, _moves, _speed)
        {
            this.canStandOn = _canStandOn;
        }

        public Boolean CanStandOn { get { return canStandOn; } set { canStandOn = value ;} }
    }
}
